//
//  Person.h
//  OC05_Homework
//
//  Created by dllo on 16/7/8.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Person : NSObject
/** 姓名 */
@property (nonatomic, copy) NSString *name;
/** 性别 */
@property (nonatomic, copy) NSString *sex;
/** 年龄 */
@property (nonatomic, assign) NSInteger age;

- (instancetype)initWithName:(NSString *)name
                         sex:(NSString *)sex
                         age:(NSInteger)age;
+ (instancetype)personWithName:(NSString *)name
                           sex:(NSString *)sex
                           age:(NSInteger)age;
- (NSComparisonResult)sortByAge:(Person *)person;
- (NSComparisonResult)sortByName:(Person *)person;
- (NSComparisonResult)sortBySex:(Person *)person;

@end
